package com.tiancan.design.gateway.service;

import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/** @author tiancan */
@Component
public class TokenServiceFeignFallBackFactory implements FallbackFactory<TokenServiceFeignClient> {
  @Autowired TokenServiceFeignFallBack tokenServiceFeignFallBack;

  @Override
  public TokenServiceFeignClient create(Throwable cause) {
    cause.printStackTrace();
    return tokenServiceFeignFallBack;
  }
}
